
#ifndef STATEPOPUP_H
#define STATEPOPUP_H

#include "GameState.h"
#include "Singleton.h"
#include "RenderableEntity.h"
#include "TextEntity.h"
#include "TimeLineEffect.h"

enum ePopUpState {POPUP_ENTER, POPUP_IDLE, POPUP_EXIT};

class StatePopUp : public GameState, public Singleton<StatePopUp>
{
private:
    
    RenderableEntity* m_oBg;
    RenderableEntity* m_oFade;
    TextEntity* m_oText;
    
    RenderableEntity* m_oLeftBg;
    RenderableEntity* m_oRightBg;

    TextEntity* m_oRight;
    TextEntity* m_oLeft;
    
    TimeLineEffect* m_oEnter;
    TimeLineEffect* m_oExit;

    bool m_bShowRight;
    bool m_bShowLeft;
    
    ePopUpState m_eState;
    
    bool m_bResult;
    
public:
    
	StatePopUp(){}
	~StatePopUp(){}
    
    void loadContent();
	void unloadContent();
    
	void enter();
    void update(float dt);
    void render();
    void exit();
    
    void popupInfo(std::string _sMessage);
    void popupConfirm(std::string _sMessage);
    void popup(std::string _sMessage, bool _bShowRight = true, std::string _sRightText = "YES", bool _bShowLeft = true, std::string _sLeftText = "NO");
    
    bool getResult();
};

#endif
